package com.example.onlinereadingsystem.demos.web.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.onlinereadingsystem.demos.web.dto.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.onlinereadingsystem.demos.web.dto.request.*;
import com.example.onlinereadingsystem.demos.web.dto.vo.MyCommentVo;
import com.example.onlinereadingsystem.demos.web.dto.vo.MyFansVo;
import com.example.onlinereadingsystem.demos.web.dto.vo.MyFollowersVo;
import com.example.onlinereadingsystem.demos.web.dto.vo.UserInfoVo;
import com.example.onlinereadingsystem.demos.web.util.Result;
import org.springframework.web.multipart.MultipartFile;

/**
* @author 27935
* @description 针对表【user】的数据库操作Service
* @createDate 2024-10-09 11:25:09
*/
public interface UserService extends IService<User> {

    /**
     * @auther ljm
     * @create 2024/10/18
     * @describe 根据用户id获取用户详情
     */
    Result<UserInfoVo> getUserInfoById(String id);

    /**
     * @auther ljm
     * @create 2024/12/26
     * @describe 修改用户信息
     */
    Result<Boolean> updateUserInfo(UpdateUserInfoParam param);

    /**
     * @auther ljm
     * @create 2024/12/26
     * @describe 上传用户头像
     */
    Result<String> uploadAvatar(MultipartFile file);

    /**
     * @auther ljm
     * @create 2024/12/26
     * @describe 获取我的评论
     */
    Result<IPage<MyCommentVo>> getMyComments(MyCommentParam param);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的粉丝
     */
    Result<IPage<MyFansVo>> getMyFans(MyFansParam param);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的关注
     */
    Result<IPage<MyFollowersVo>> getMyFollowers(MyFollowersParam param);

    /**
     * @auther ljm
     * @create 2025/1/29
     * @describe 关注用户
     */
    Result<Boolean> followed(FollowedParam param);

    /**
     * @auther ljm
     * @create 2025/1/29
     * @describe 取消关注用户
     */
    Result<Boolean> cancelFollow(CancelFollowParam param);
}
